package model

import (
	"gorm.io/gorm"
	"time"
)

type Lexicon struct {
	Id        uint32         `gorm:"column:id;type:int UNSIGNED;primaryKey;not null;" form:"id" json:"id"`
	Text      string         `gorm:"column:text;type:varchar(20);comment:敏感词;not null;" form:"text" json:"text"` // 敏感词
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" form:"created_at" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" form:"updated_at" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" form:"deleted_at" json:"deleted_at"`
}

func (l Lexicon) TableName() string {
	return "lexicon"
}
